package com.huangwei.controller;

import com.huangwei.model.Nav;
import com.huangwei.service.NavService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping(value = "/nav")
public class NavController {
    @Resource
    NavService navService;

    @GetMapping("/getAllNavs")
    public List<Nav> getAllNav() {
        List<Nav> navList = navService.getAllNavs();
        return navList;
    }
}
